YOU ARE REQUIRED TO CONTACT ME IN SOME WAY (SEND ME A POSTCARD, A LETTER, A DISK, A PEN OR PENCIL, LOTS OF MONEY, OR ANYTHING USEFUL TO LET ME KNOW THAT SOMEONE OUT THERE APPRECIATES MY SIMPLE GESTURES TO HELP OTHER PROGRAMMERS.
I AM A POOR, STARVING STUDENT AT GEORGIA TECH (GO JACKETS!!!) AND CAN USE ANY HELPFUL INFORMATION, ADVICE, CARS, ETC. TO GET ME THROUGH THESE LEAN YEARS.
Also, please give me credit for these procedures if you use them commercially (just leave the comments in).
There is no guarantee of the performance of these procedures, written or implied, and neither I, nor Information Management, Inc., nor anyone associated with us assume any liability for their performance. The archiving and subsequent restoration of data is a very dangerous procedure which can result in data loss and lost time (everybody knows that), these procedures are intended to ease the burden of writing custom made backup and restore routines for each database created.
Enough of the legal mumbo jumbo, what does it really do ?
BACKUP and RESTORE are two relatively simple procedures for 4D which can just be dropped into any 4D database (along with a small proc.ext file) to allow you, with no customization necessary, to archive all data for that database into one file and restore it at a later date. They use three external procedures provided by Acius in their December 1987 developer mailings (now available on BBS's everywhere).
DataBaseName - gets the name of the current database
GetNumFiles - gets the total number of files in the database
GetFileNames - gets the name of a file from within the database
These are included in the file proc.ext which should be dropped into the database folder before the procedures below are pasted into a 4D global procedures. You can also move these into the database.res file using 4D External Mover provided with 4th Dimension.
Just paste these procedures into 4D globals and supply menu commands (Backup Database, and Restore Database From Backup) which call the respective procedures. You should provide password protection for RESTORE to only the highest level user.
Possible modifications ...
Removal of the safety feature of saving the number of files in the database. This would allow you to transfer all data from one database into an updated version in which files have been added or deleted from the structure.
Removal of the database name from the backup. This, along with the above change, would let you move data from two completely different databases that share some subset of each other's structure (exactly !!!).
More powerful options dealing with deleting or appending to current data, or deleting only duplicates, etc. I have no need for it so I haven't even attempted it.
Once more I beg of you to send me some correspondence, physical or electronic telling me in what kind of database you use these in, how you like it, etc., send me some of your own work, from 4D or other things, send me some compensation or advice or anything useful, (beggars can't be choosers).